home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cool / ge_cool.lha / GE_COOL2.1 / misc / test / test.h < prev   
C/C++ Source or Header  |  1992-04-13  |  808b  |  35 lines

  1. //
  2. // Copyright (C) 1991 Texas Instruments Incorporated.
  3. //
  4. // Permission is granted to any individual or institution to use, copy, modify,
  5. // and distribute this software, provided that this complete copyright and
  6. // permission notice is maintained, intact, in all copies and supporting
  7. // documentation.
  8. //
  9. // Texas Instruments Incorporated provides this software "as is" without
  10. // express or implied warranty.
  11. //
  12.  
  13. extern void test_start(char* name);
  14. extern void test_begin(const char* msg);
  15. extern void test_perform(int success);
  16. extern void test_summary();
  17.  
  18. #define START(s) test_start(s);
  19.  
  20. #define TEST(s,p,v)         \
  21.  {                \
  22.   test_begin(s);        \
  23.   test_perform(p==v);        \
  24.  }
  25.  
  26. #define TEST_RUN(s,x,p,v)     \
  27.  {                \
  28.   x;                \
  29.   test_begin(s);        \
  30.   test_perform(p==v);        \
  31.  }
  32.  
  33. #define SUMMARY() test_summary();
  34.  
  35.